package com.gdit.zax.utils;

import java.util.Date;

public class LogUtil {
	private static final boolean isDeubg = true;
	private static StringBuffer srb =  new StringBuffer("start log...<br>");
	
	public static void print (String msg) {
		if (isDeubg) {
			System.out.println(msg);
			if (srb==null) {
				srb =  new StringBuffer("start log...<br>");
			}
			int lent = srb.length();
			if (lent > 10000){
				srb.delete(0, 1000);
			}
			srb.append(new Date().toString().replace(".0", "") + "    " + msg + "<br>");
		}
	}
	
	public static String getlog () {
		return srb.toString();
	}
}
